import type {Response_Dto} from '@/Dto/Response/Api_Result'
import request from '@/utils/request'

export const Get_Reservation=(obj:{page:number;limit:number;key:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Get_Reservation',
        method:'get',
        params:obj
    })
}


export const Get_Product=():Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Get_Product',
        method:'get'
    })
}

export const Get_User=(obj:{time:string;xm:string;key:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Get_User',
        method:'get',
        params:obj
    })
}

export const Get_Customer=(obj:{key:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Get_Customer',
        method:'get',
        params:obj
    })
}

export const Add_Reservation=(obj:{cid:string;time:string;uid:string;pid:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Add_Reservation',
        method:'post',
        data:obj
    })
}

export const Update_Reservation_State=(obj:{rid:string;state:number}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Update_Reservation_State',
        method:'post',
        data:obj
    })
}
export const Delete_Reservation=(obj:{rid:string}):Promise<Response_Dto>=>{
    return request({
        url:'api/reservation/Delete_Reservation',
        method:'post',
        data:obj
    })
}